home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 21 / CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso / CUCD / Utilities / PGP / source / pgp50i-b8a / tools / util.h < prev   
Encoding:
C/C++ Source or Header  |  1998-01-04  |  1.4 KB  |  66 lines

  1. /*
  2.  * util.h -- Miscellaneous defines
  3.  *
  4.  * Copyright (C) 1997 Pretty Good Privacy, Inc.
  5.  *
  6.  * Written by Mark H. Weaver
  7.  *
  8.  * $Id: util.h,v 1.10 1997/07/09 00:28:00 colin Exp $
  9.  */
  10.  
  11. #ifndef UTIL_H
  12. #define UTIL_H 1
  13.  
  14. typedef unsigned long    word32;
  15. typedef unsigned short    word16;
  16. typedef unsigned char    byte;
  17.  
  18. #define FMT32    "%08lx"
  19. #define FMT16    "%04x"
  20. #define FMT8    "%02x"
  21.  
  22. #define TAB_CHAR        '\244'    /* Currency symbol, like o in top of x */
  23. #define TAB_STRING        "\244"
  24. #define TAB_PAD_CHAR    ' '
  25. #define TAB_PAD_STRING    " "
  26. #define FORMFEED_CHAR    '\245'    /* Yen symbol, like = on top of Y */
  27. #define FORMFEED_STRING    "\245"
  28.  
  29. #define BYTES_PER_LINE    54        /* When using radix 64 */
  30.  
  31. #define LINES_PER_PAGE    70        /* Exclusive of header line */
  32. #define LINE_LENGTH        80
  33. #define PREFIX_LENGTH    7        /* Length of prefix, including the space */
  34. #define HDR_HEX_LENGTH    19        /* Length of hex prefix on header */
  35.  
  36.  
  37. /* Enough to hold one whole page of munged data */
  38. /* There is no point making this excessively too large */
  39. #define PAGE_BUFFER_SIZE    8192
  40.  
  41. #if PAGE_BUFFER_SIZE < (LINES_PER_PAGE + 2) * (LINE_LENGTH + PREFIX_LENGTH + 2)
  42. #error PAGE_BUFFER_SIZE is too small
  43. #endif
  44.  
  45.  
  46. /* Header flags */
  47. #define HDR_FLAG_LASTPAGE    0x01    /* Indicates last page */
  48.  
  49.  
  50. #define elemsof(array) (sizeof(array)/sizeof(*(array)))
  51.  
  52.  
  53. extern char const hexDigits[];
  54. extern char const radix64Digits[];
  55.  
  56. #endif /* !UTIL_H */
  57.  
  58. /*
  59.  * Local Variables:
  60.  * tab-width: 4
  61.  * End:
  62.  * vi: ts=4 sw=4
  63.  * vim: si
  64.  */
  65.  
  66.